package fplaton.ui.helper;

import fplaton.ui.Course;
import java.awt.HeadlessException;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.DefaultListModel;

/**
 *
 * @author ASOT
 */
public class CourseController {
    private final  ICourseDao dao;
    public CourseController(ICourseDao dao){
        this.dao=dao;
    }
    
    public boolean updateCourseController( String className, String courseName, Course Course)
            throws HeadlessException {
        try {
            dao.courseInsertValues(className, courseName,this);
            return true;
        } catch (SQLException ex) {
            Logger.getLogger(Course.class.getName()).log(Level.SEVERE, null, ex);
            return false;
        }
    }
}
